package Test001;

public class GameCharacter {
    static int totalCharacters;
    private String CharacterName;
    private int level;
    public GameCharacter(String CharacterName,int level){
        this.CharacterName=CharacterName;
        this.level=level;
        totalCharacters++;
    }
    public static void displayServerStatus(){
        System.out.println("当前服务器共有"+totalCharacters+"个游戏角色");
    }
    public void levelup(){
        level++;
    }

    public String getCharacterName() {
        return CharacterName;
    }

    public void setCharacterName(String characterName) {
        CharacterName = characterName;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }
    public void show02(){
        System.out.println("角色："+CharacterName+"，等级"+level);
    }
}
